#!/bin/bash

mkdir -p ../results/
descriptor="intensity"

for s in {0..10}; do
  conf="
DataSet = kitti
DataSetRootDirectory = ~/data/kitti/dataset
SequenceNumber = ${s}
Descriptor = ${descriptor}

StereoAlgorithm = BlockMatching

minDisparity = 0
numberOfDisparities = 80
SADWindowSize = 9
textureThreshold = 5
uniquenessRatio = 15
trySmallerWindows = 1

minValidDisparity = 1


numPyramidLevels = 5
maxTestLevel     = 0

lossFunction = Tukey

verbosity = Silent

maxIterations = 400
minTranslationMagToKeyFrame = 0.5
minRotationMagToKeyFrame    = 5.0

parameterTolerance = 1e-6
functionTolerance = 1e-6

goodPointThreshold = 0.85
maxFractionOfGoodPointsToKeyFrame = 0.6

minSaliency = 2.5

relaxTolerancesForCoarseLevels = 0

"

conf_fn=$(mktemp)
echo "$conf" > $conf_fn

prefix="../results/kitti_${descriptor}_seq_${s}_no_kf"
./bin/vo -c $conf_fn -o $prefix -n -1 --store-timing --store-iterations -x

done
